﻿using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;

namespace com.Norland.SPMS.WinUI.ClientLoader
{
	/// <summary>
	/// login 的摘要描述。
	/// </summary>
	public class LoginForm : System.Windows.Forms.Form
	{
		private System.Windows.Forms.Label label1;
		private System.Windows.Forms.Label label2;
		private System.Windows.Forms.Panel panel1;
		private System.Windows.Forms.TextBox tbPassword;
		private System.Windows.Forms.TextBox tbUser;
		private System.Windows.Forms.Panel panel2;
		private System.Windows.Forms.Panel panel3;
		private System.Windows.Forms.Panel panel4;
		private System.Windows.Forms.Button btLogin;
		private System.Windows.Forms.Button btCancel;
		/// <summary>
		/// 設計工具所需的變數。
		/// </summary>
		private System.ComponentModel.Container components = null;

		public LoginForm()
		{
			//
			// Windows Form 設計工具支援的必要項
			//
			InitializeComponent();

			//
			// TODO: 在 InitializeComponent 呼叫之後加入任何建構函式程式碼
			//
		}

		/// <summary>
		/// 清除任何使用中的資源。
		/// </summary>
		protected override void Dispose( bool disposing )
		{
			if( disposing )
			{
				if(components != null)
				{
					components.Dispose();
				}
			}
			base.Dispose( disposing );
		}

		#region Windows Form 設計工具產生的程式碼
		/// <summary>
		/// 此為設計工具支援所必須的方法 - 請勿使用程式碼編輯器修改
		/// 這個方法的內容。
		/// </summary>
		private void InitializeComponent()
		{
			System.Configuration.AppSettingsReader configurationAppSettings = new System.Configuration.AppSettingsReader();
			this.label1 = new System.Windows.Forms.Label();
			this.label2 = new System.Windows.Forms.Label();
			this.tbPassword = new System.Windows.Forms.TextBox();
			this.tbUser = new System.Windows.Forms.TextBox();
			this.btLogin = new System.Windows.Forms.Button();
			this.btCancel = new System.Windows.Forms.Button();
			this.panel1 = new System.Windows.Forms.Panel();
			this.panel4 = new System.Windows.Forms.Panel();
			this.panel3 = new System.Windows.Forms.Panel();
			this.panel2 = new System.Windows.Forms.Panel();
			this.panel1.SuspendLayout();
			this.panel4.SuspendLayout();
			this.SuspendLayout();
			// 
			// label1
			// 
			this.label1.Font = new System.Drawing.Font("新細明體", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(136)));
			this.label1.Location = new System.Drawing.Point(16, 16);
			this.label1.Name = "label1";
			this.label1.Size = new System.Drawing.Size(56, 23);
			this.label1.TabIndex = 0;
			this.label1.Text = "用户：";
			// 
			// label2
			// 
			this.label2.Font = new System.Drawing.Font("新細明體", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(136)));
			this.label2.Location = new System.Drawing.Point(16, 64);
			this.label2.Name = "label2";
			this.label2.Size = new System.Drawing.Size(56, 23);
			this.label2.TabIndex = 1;
			this.label2.Text = "密码：";
			// 
			// tbPassword
			// 
			this.tbPassword.Location = new System.Drawing.Point(72, 64);
			this.tbPassword.Name = "tbPassword";
			this.tbPassword.PasswordChar = '*';
			this.tbPassword.Size = new System.Drawing.Size(256, 22);
			this.tbPassword.TabIndex = 2;
			this.tbPassword.Text = "";
			// 
			// tbUser
			// 
			this.tbUser.Location = new System.Drawing.Point(72, 16);
			this.tbUser.Name = "tbUser";
			this.tbUser.Size = new System.Drawing.Size(256, 22);
			this.tbUser.TabIndex = 3;
			this.tbUser.Text = "";
			// 
			// btLogin
			// 
			this.btLogin.Location = new System.Drawing.Point(176, 96);
			this.btLogin.Name = "btLogin";
			this.btLogin.Size = new System.Drawing.Size(75, 24);
			this.btLogin.TabIndex = 4;
			this.btLogin.Text = ((string)(configurationAppSettings.GetValue("btLogin.Text", typeof(string))));
			this.btLogin.Click += new System.EventHandler(this.btLogin_Click);
			// 
			// btCancel
			// 
			this.btCancel.Location = new System.Drawing.Point(256, 96);
			this.btCancel.Name = "btCancel";
			this.btCancel.Size = new System.Drawing.Size(75, 24);
			this.btCancel.TabIndex = 5;
			this.btCancel.Text = ((string)(configurationAppSettings.GetValue("btCancel.Text", typeof(string))));
			this.btCancel.Click += new System.EventHandler(this.btCancel_Click);
			// 
			// panel1
			// 
			this.panel1.Controls.Add(this.panel4);
			this.panel1.Controls.Add(this.panel3);
			this.panel1.Controls.Add(this.panel2);
			this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
			this.panel1.Location = new System.Drawing.Point(0, 0);
			this.panel1.Name = "panel1";
			this.panel1.Size = new System.Drawing.Size(376, 261);
			this.panel1.TabIndex = 6;
			// 
			// panel4
			// 
			this.panel4.Controls.Add(this.btCancel);
			this.panel4.Controls.Add(this.tbUser);
			this.panel4.Controls.Add(this.tbPassword);
			this.panel4.Controls.Add(this.label1);
			this.panel4.Controls.Add(this.btLogin);
			this.panel4.Controls.Add(this.label2);
			this.panel4.Dock = System.Windows.Forms.DockStyle.Fill;
			this.panel4.Location = new System.Drawing.Point(0, 64);
			this.panel4.Name = "panel4";
			this.panel4.Size = new System.Drawing.Size(376, 141);
			this.panel4.TabIndex = 8;
			this.panel4.Paint += new System.Windows.Forms.PaintEventHandler(this.panel4_Paint);
			// 
			// panel3
			// 
			this.panel3.Dock = System.Windows.Forms.DockStyle.Top;
			this.panel3.Location = new System.Drawing.Point(0, 0);
			this.panel3.Name = "panel3";
			this.panel3.Size = new System.Drawing.Size(376, 64);
			this.panel3.TabIndex = 7;
			// 
			// panel2
			// 
			this.panel2.Dock = System.Windows.Forms.DockStyle.Bottom;
			this.panel2.Location = new System.Drawing.Point(0, 205);
			this.panel2.Name = "panel2";
			this.panel2.Size = new System.Drawing.Size(376, 56);
			this.panel2.TabIndex = 6;
			// 
			// LoginForm
			// 
			this.AutoScaleBaseSize = new System.Drawing.Size(5, 15);
			this.ClientSize = new System.Drawing.Size(376, 261);
			this.Controls.Add(this.panel1);
			this.Name = "LoginForm";
			this.Text = "login";
			this.Load += new System.EventHandler(this.login_Load);
			this.panel1.ResumeLayout(false);
			this.panel4.ResumeLayout(false);
			this.ResumeLayout(false);

		}
		#endregion
		static void Main() 
		{
			Application.Run(new LoginForm());
		}


		private void login_Load(object sender, System.EventArgs e)
		{
		
		}

		private void btCancel_Click(object sender, System.EventArgs e)
		{
			Application.Exit();
		}

		private void btLogin_Click(object sender, System.EventArgs e)
		{

			//MainForm mf=new MainForm();
			//mf.Show();
			this.Close();
		}

		private void panel4_Paint(object sender, System.Windows.Forms.PaintEventArgs e)
		{
		
		}
	}
}
